package AbstractFactory;

/**
 * 抽象工厂模式客户端
 * Created by Garden on 2019/5/13.
 */
public class Client {

    public static void main(String[] args) {
        //生成产品1以及服务
        AbstractProductFactory productOneFactory = new ProductOneFactory();
        AbstractProduct productOne = productOneFactory.makeProduct();
        AbstractProductService productOneService = productOneFactory.makeProductService();
        productOne.introduce();
        productOneService.add();

        //生成产品2以及服务
        AbstractProductFactory productTwoFactory = new ProductTwoFactory();
        AbstractProduct productTwo = productTwoFactory.makeProduct();
        AbstractProductService productTwoService =productTwoFactory.makeProductService();
        productTwo.introduce();
        productTwoService.add();
    }

}
